package com.wicket.okrpbff.web.contorller;

import com.wicket.okrpbff.biz.service.TemplateEngineService;
import com.wicket.okrpbff.biz.service.dto.req.BffAddSemanticEngineReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffQuerySemanticEngineDetailReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffQuerySemanticEngineListReqDto;
import com.wicket.okrpbff.biz.service.dto.req.BffUpdateSemanticEngineReqDto;
import com.wicket.okrpbff.biz.service.dto.res.BffAddSemanticEngineRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQuerySemanticEngineDetailRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffQuerySemanticEngineListRespDto;
import com.wicket.okrpbff.biz.service.dto.res.BffUpdateSemanticEngineRespDto;
import com.wicket.okrpbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrcomponent.integration.FwCompTemplateEngineClient;
import com.wicket.okrcomponent.integration.dto.AddSemanticEngineRespDto;
import com.wicket.okrcomponent.integration.dto.AddSemanticEngineReqDto;
import com.wicket.okrpbff.common.exception.Assert;
import com.wicket.okrcomponent.integration.dto.UpdateSemanticEngineRespDto;
import com.wicket.okrcomponent.integration.dto.UpdateSemanticEngineReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySemanticEngineDetailRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySemanticEngineDetailReqDto;
import com.wicket.okrframework.integration.FwBaseBehaviorTypeClient;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryBehaviorTypeDetailReqDto;
import com.wicket.okrframework.integration.FwBaseAppSceneClient;
import com.wicket.okrframework.integration.dto.QueryBizSceneDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryBizSceneDetailReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordInfoDetailComReqDto;
import com.wicket.okrcomponent.integration.dto.QuerySemanticEngineListRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySemanticEngineListReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryInductionRecordListComReqDto;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrframework.integration.dto.QueryBizAppSceneDetailRespDto;
import com.wicket.okrframework.integration.dto.QueryBizAppSceneDetailReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "TemplateEngine", tags = {"TemplateEngine"})
@RestController
// @RequestMapping("/poms/templateEngine/")
public class TemplateEngineController {
    @Autowired
    TemplateEngineService templateEngineService;

    /**
   * B2-8新增语义引擎（平台）
   * gen by moon at 8/10/2022, 3:43:15 AM
   */
    @PostMapping("/oms/platform/templateEngine/addSemanticEngine")
    @ApiOperation(value = "B2-8新增语义引擎（平台）", response = OkrResult.class)
    public OkrResult<BffAddSemanticEngineRespDto> addSemanticEngine(@RequestBody(required=false) @Validated BffAddSemanticEngineReqDto reqDTO){
        return OkrResult.success(templateEngineService.addSemanticEngine(reqDTO));
    }

    /**
   * B2-8查询语义引擎列表（平台）
   * gen by moon at 10/31/2022, 7:00:47 PM
   */
    @PostMapping("/oms/platform/templateEngine/querySemanticEngineList")
    @ApiOperation(value = "B2-8查询语义引擎列表（平台）", response = OkrResult.class)
    public OkrResult<BffQuerySemanticEngineListRespDto> querySemanticEngineList(@RequestBody(required=false) @Validated BffQuerySemanticEngineListReqDto reqDTO){
        return OkrResult.success(templateEngineService.querySemanticEngineList(reqDTO));
    }

    /**
   * B2-8查询语义引擎详情
   * gen by moon at 10/28/2022, 11:08:54 PM
   */
    @PostMapping("/oms/platform/templateEngine/querySemanticEngineDetail")
    @ApiOperation(value = "B2-8查询语义引擎详情", response = OkrResult.class)
    public OkrResult<BffQuerySemanticEngineDetailRespDto> querySemanticEngineDetail(@RequestBody(required=false) @Validated BffQuerySemanticEngineDetailReqDto reqDTO){
        return OkrResult.success(templateEngineService.querySemanticEngineDetail(reqDTO));
    }

    /**
   * B2-8修改语义引擎（平台）
   * gen by moon at 8/17/2022, 8:03:55 PM
   */
    @PostMapping("/oms/platform/templateEngine/updateSemanticEngine")
    @ApiOperation(value = "B2-8修改语义引擎（平台）", response = OkrResult.class)
    public OkrResult<BffUpdateSemanticEngineRespDto> updateSemanticEngine(@RequestBody(required=false) @Validated BffUpdateSemanticEngineReqDto reqDTO){
        return OkrResult.success(templateEngineService.updateSemanticEngine(reqDTO));
    }

}

